# -*- coding: utf-8 -*-

from gtk import *
from includes import *

class Header(HBox):
	def __init__(self):
		HBox.__init__(self)
		
		self.align_selection = Alignment(xalign=0.5)
		
		selection = HBox()
		selection.pack_start(image_new_from_file("../img/selection.png"), expand=False)
		selection.pack_start(Label("1 - Selection"), expand=False)
		
		self.align_selection.add(selection)
		
		self.add(self.align_selection)
		
		self.align_format = Alignment(xalign=0.5)
		
		format = HBox()
		format.pack_start(image_new_from_file("../img/format.png"), expand=False)
		format.pack_start(Label("2 - Format"), expand=False)
		
		self.align_format.add(format)
		self.align_format.set_sensitive(False)
		
		self.add(self.align_format)
		
		self.align_recadrage = Alignment(xalign=0.5)
		
		recadrage = HBox()
		recadrage.pack_start(image_new_from_file("../img/recadrage.png"), expand=False)
		recadrage.pack_start(Label("3 - Retouches"), expand=False)
		
		self.align_recadrage.add(recadrage)
		self.align_recadrage.set_sensitive(False)
		
		self.add(self.align_recadrage)
		
	def update_step(self, step):
		self.align_selection.set_sensitive(step == STEP_SELECTION)
		self.align_format.set_sensitive(step == STEP_FORMAT)
		self.align_recadrage.set_sensitive(step == STEP_CROPPING)
		
	
